# Contributor: Michał Polański <michal@polanski.me>
# Maintainer: Michał Polański <michal@polanski.me>
pkgname=conmon
pkgver=2.1.2
pkgrel=0
pkgdesc="OCI container runtime monitor"
url="https://github.com/containers/conmon"
license="Apache-2.0"
arch="all"
makedepends="bash go-md2man glib-dev libseccomp-dev"
subpackages="$pkgname-doc"
source="https://github.com/containers/conmon/archive/v$pkgver/conmon-$pkgver.tar.gz"

prepare() {
	default_prepare

	# fix location of go-md2man
	sed -E "s/(GOMD2MAN =).*/\1 go-md2man/" -i docs/Makefile
}

build() {
	make
}

check() {
	./bin/conmon --version
}

package() {
	make install PREFIX=/usr DESTDIR="$pkgdir"
}

sha512sums="
2cf52a2efde9c0b5c728daf7db27a8ae437176db30ec506b117feef081ad86f564cfd3d8c331e4d8f2328cb7262db03b62f9b3a4371d3205d7d69822e062916a  conmon-2.1.2.tar.gz
"
